package cn.aezo.minions.gen.datasource.mysql;

import cn.aezo.core.entity.SqlRunnable;
import cn.aezo.core.entity.datasource.ColumnInfo;
import cn.aezo.core.entity.datasource.DataSourceInfo;
import cn.aezo.core.entity.datasource.TableInfo;

public class MySqlDataSourceInfo implements DataSourceInfo {
	private SqlRunnable sqlRunnable;

	private MySqlDataSourceInfo(SqlRunnable sqlRunnable) {
		this.sqlRunnable = sqlRunnable;
	}

	public static MySqlDataSourceInfo getInstance(SqlRunnable sqlRunnable) {
		return new MySqlDataSourceInfo(sqlRunnable);
	}

	@Override
	public TableInfo getTableInfo() {
		return new MySqlTableInfo(new MySqlColumnInfo(sqlRunnable), sqlRunnable);
	}

	@Override
	public ColumnInfo getColumnInfo() {
		return new MySqlColumnInfo(sqlRunnable);
	}
}
